3.1.2 \(\int (d+e x)^3 (a+b \text {ArcTan}(c x)) \, dx\) [2]

Optimal. Leaf size=144 \[ -\frac {b e \left (6 c^2 d^2-e^2\right ) x}{4 c^3}-\frac {b d e^2 x^2}{2 c}-\frac {b e^3 x^3}{12 c}-\frac {b \left (c^4 d^4-6 c^2 d^2 e^2+e^4\right ) \text {ArcTan}(c x)}{4 c^4 e}+\frac {(d+e x)^4 (a+b \text {ArcTan}(c x))}{4 e}-\frac {b d (c d-e) (c d+e) \log \left (1+c^2 x^2\right )}{2 c^3} \]

[Out]

-1/4*b*e*(6*c^2*d^2-e^2)*x/c^3-1/2*b*d*e^2*x^2/c-1/12*b*e^3*x^3/c-1/4*b*(c^4*d^4-6*c^2*d^2*e^2+e^4)*arctan(c*x
)/c^4/e+1/4*(e*x+d)^4*(a+b*arctan(c*x))/e-1/2*b*d*(c*d-e)*(c*d+e)*ln(c^2*x^2+1)/c^3

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 144, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {4972, 716, 649, 209, 266} \begin {gather*} \frac {(d+e x)^4 (a+b \text {ArcTan}(c x))}{4 e}-\frac {b \text {ArcTan}(c x) \left (c^4 d^4-6 c^2 d^2 e^2+e^4\right )}{4 c^4 e}-\frac {b e x \left (6 c^2 d^2-e^2\right )}{4 c^3}-\frac {b d (c d-e) (c d+e) \log \left (c^2 x^2+1\right )}{2 c^3}-\frac {b d e^2 x^2}{2 c}-\frac {b e^3 x^3}{12 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(d + e*x)^3*(a + b*ArcTan[c*x]),x]

[Out]

-1/4*(b*e*(6*c^2*d^2 - e^2)*x)/c^3 - (b*d*e^2*x^2)/(2*c) - (b*e^3*x^3)/(12*c) - (b*(c^4*d^4 - 6*c^2*d^2*e^2 +
e^4)*ArcTan[c*x])/(4*c^4*e) + ((d + e*x)^4*(a + b*ArcTan[c*x]))/(4*e) - (b*d*(c*d - e)*(c*d + e)*Log[1 + c^2*x
^2])/(2*c^3)

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 649

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[(-a)*c]

Rule 716

Int[((d_) + (e_.)*(x_))^(m_)/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[PolynomialDivide[(d + e*x)^m, a + c*x^2,
x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[m, 1] && (NeQ[d, 0] || GtQ[m, 2])

Rule 4972

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a + b*
ArcTan[c*x])/(e*(q + 1))), x] - Dist[b*(c/(e*(q + 1))), Int[(d + e*x)^(q + 1)/(1 + c^2*x^2), x], x] /; FreeQ[{
a, b, c, d, e, q}, x] && NeQ[q, -1]

Rubi steps

\begin {align*} \int (d+e x)^3 \left (a+b \tan ^{-1}(c x)\right ) \, dx &=\frac {(d+e x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 e}-\frac {(b c) \int \frac {(d+e x)^4}{1+c^2 x^2} \, dx}{4 e}\\ &=\frac {(d+e x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 e}-\frac {(b c) \int \left (\frac {e^2 \left (6 c^2 d^2-e^2\right )}{c^4}+\frac {4 d e^3 x}{c^2}+\frac {e^4 x^2}{c^2}+\frac {c^4 d^4-6 c^2 d^2 e^2+e^4+4 c^2 d (c d-e) e (c d+e) x}{c^4 \left (1+c^2 x^2\right )}\right ) \, dx}{4 e}\\ &=-\frac {b e \left (6 c^2 d^2-e^2\right ) x}{4 c^3}-\frac {b d e^2 x^2}{2 c}-\frac {b e^3 x^3}{12 c}+\frac {(d+e x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 e}-\frac {b \int \frac {c^4 d^4-6 c^2 d^2 e^2+e^4+4 c^2 d (c d-e) e (c d+e) x}{1+c^2 x^2} \, dx}{4 c^3 e}\\ &=-\frac {b e \left (6 c^2 d^2-e^2\right ) x}{4 c^3}-\frac {b d e^2 x^2}{2 c}-\frac {b e^3 x^3}{12 c}+\frac {(d+e x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 e}-\frac {(b d (c d-e) (c d+e)) \int \frac {x}{1+c^2 x^2} \, dx}{c}-\frac {\left (b \left (c^4 d^4-6 c^2 d^2 e^2+e^4\right )\right ) \int \frac {1}{1+c^2 x^2} \, dx}{4 c^3 e}\\ &=-\frac {b e \left (6 c^2 d^2-e^2\right ) x}{4 c^3}-\frac {b d e^2 x^2}{2 c}-\frac {b e^3 x^3}{12 c}-\frac {b \left (c^4 d^4-6 c^2 d^2 e^2+e^4\right ) \tan ^{-1}(c x)}{4 c^4 e}+\frac {(d+e x)^4 \left (a+b \tan ^{-1}(c x)\right )}{4 e}-\frac {b d (c d-e) (c d+e) \log \left (1+c^2 x^2\right )}{2 c^3}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.30, size = 218, normalized size = 1.51 \begin {gather*} \frac {(d+e x)^4 (a+b \text {ArcTan}(c x))-\frac {b c \left (2 \sqrt {-c^2} e^2 x \left (-3 e^2+c^2 \left (18 d^2+6 d e x+e^2 x^2\right )\right )-3 \left (c^4 d^4+e^3 \left (4 \sqrt {-c^2} d+e\right )-2 c^2 d^2 e \left (2 \sqrt {-c^2} d+3 e\right )\right ) \log \left (1-\sqrt {-c^2} x\right )+3 \left (c^4 d^4+2 c^2 d^2 \left (2 \sqrt {-c^2} d-3 e\right ) e+e^3 \left (-4 \sqrt {-c^2} d+e\right )\right ) \log \left (1+\sqrt {-c^2} x\right )\right )}{6 \left (-c^2\right )^{5/2}}}{4 e} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x)^3*(a + b*ArcTan[c*x]),x]

[Out]

((d + e*x)^4*(a + b*ArcTan[c*x]) - (b*c*(2*Sqrt[-c^2]*e^2*x*(-3*e^2 + c^2*(18*d^2 + 6*d*e*x + e^2*x^2)) - 3*(c
^4*d^4 + e^3*(4*Sqrt[-c^2]*d + e) - 2*c^2*d^2*e*(2*Sqrt[-c^2]*d + 3*e))*Log[1 - Sqrt[-c^2]*x] + 3*(c^4*d^4 + 2
*c^2*d^2*(2*Sqrt[-c^2]*d - 3*e)*e + e^3*(-4*Sqrt[-c^2]*d + e))*Log[1 + Sqrt[-c^2]*x]))/(6*(-c^2)^(5/2)))/(4*e)

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 179, normalized size = 1.24

method result size
derivativedivides \(\frac {\frac {\left (c e x +c d \right )^{4} a}{4 c^{3} e}+b \arctan \left (c x \right ) d^{3} c x +\frac {3 b c e \arctan \left (c x \right ) d^{2} x^{2}}{2}+b c \,e^{2} \arctan \left (c x \right ) d \,x^{3}+\frac {b c \,e^{3} \arctan \left (c x \right ) x^{4}}{4}-\frac {3 b e \,d^{2} x}{2}-\frac {b \,e^{2} d \,x^{2}}{2}-\frac {b \,e^{3} x^{3}}{12}+\frac {b \,e^{3} x}{4 c^{2}}-\frac {b \ln \left (c^{2} x^{2}+1\right ) d^{3}}{2}+\frac {b \,e^{2} \ln \left (c^{2} x^{2}+1\right ) d}{2 c^{2}}+\frac {3 b e \arctan \left (c x \right ) d^{2}}{2 c}-\frac {b \,e^{3} \arctan \left (c x \right )}{4 c^{3}}}{c}\) \(179\)
default \(\frac {\frac {\left (c e x +c d \right )^{4} a}{4 c^{3} e}+b \arctan \left (c x \right ) d^{3} c x +\frac {3 b c e \arctan \left (c x \right ) d^{2} x^{2}}{2}+b c \,e^{2} \arctan \left (c x \right ) d \,x^{3}+\frac {b c \,e^{3} \arctan \left (c x \right ) x^{4}}{4}-\frac {3 b e \,d^{2} x}{2}-\frac {b \,e^{2} d \,x^{2}}{2}-\frac {b \,e^{3} x^{3}}{12}+\frac {b \,e^{3} x}{4 c^{2}}-\frac {b \ln \left (c^{2} x^{2}+1\right ) d^{3}}{2}+\frac {b \,e^{2} \ln \left (c^{2} x^{2}+1\right ) d}{2 c^{2}}+\frac {3 b e \arctan \left (c x \right ) d^{2}}{2 c}-\frac {b \,e^{3} \arctan \left (c x \right )}{4 c^{3}}}{c}\) \(179\)
risch \(\frac {i b \,d^{4} \ln \left (c^{2} x^{2}+1\right )}{16 e}+\frac {3 e b \,d^{2} \arctan \left (c x \right )}{2 c^{2}}+\frac {i e^{2} b d \,x^{3} \ln \left (-i c x +1\right )}{2}-\frac {i \left (e x +d \right )^{4} b \ln \left (i c x +1\right )}{8 e}+\frac {i b \,d^{3} x \ln \left (-i c x +1\right )}{2}+\frac {i e^{3} b \,x^{4} \ln \left (-i c x +1\right )}{8}-\frac {b \,d^{4} \arctan \left (c x \right )}{8 e}+\frac {x^{4} e^{3} a}{4}-\frac {b \,e^{3} x^{3}}{12 c}+\frac {e^{3} b x}{4 c^{3}}+x^{3} e^{2} d a +\frac {3 x^{2} e \,d^{2} a}{2}+x \,d^{3} a -\frac {b d \,e^{2} x^{2}}{2 c}-\frac {3 e b \,d^{2} x}{2 c}+\frac {e^{2} b d \ln \left (c^{2} x^{2}+1\right )}{2 c^{3}}-\frac {b \,d^{3} \ln \left (c^{2} x^{2}+1\right )}{2 c}-\frac {e^{3} b \arctan \left (c x \right )}{4 c^{4}}+\frac {3 i e b \,d^{2} x^{2} \ln \left (-i c x +1\right )}{4}\) \(275\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x+d)^3*(a+b*arctan(c*x)),x,method=_RETURNVERBOSE)

[Out]

1/c*(1/4*(c*e*x+c*d)^4*a/c^3/e+b*arctan(c*x)*d^3*c*x+3/2*b*c*e*arctan(c*x)*d^2*x^2+b*c*e^2*arctan(c*x)*d*x^3+1
/4*b*c*e^3*arctan(c*x)*x^4-3/2*b*e*d^2*x-1/2*b*e^2*d*x^2-1/12*b*e^3*x^3+1/4*b/c^2*e^3*x-1/2*b*ln(c^2*x^2+1)*d^
3+1/2*b/c^2*e^2*ln(c^2*x^2+1)*d+3/2*b/c*e*arctan(c*x)*d^2-1/4*b/c^3*e^3*arctan(c*x))

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 184, normalized size = 1.28 \begin {gather*} \frac {1}{4} \, a x^{4} e^{3} + a d x^{3} e^{2} + \frac {3}{2} \, a d^{2} x^{2} e + a d^{3} x + \frac {3}{2} \, {\left (x^{2} \arctan \left (c x\right ) - c {\left (\frac {x}{c^{2}} - \frac {\arctan \left (c x\right )}{c^{3}}\right )}\right )} b d^{2} e + \frac {{\left (2 \, c x \arctan \left (c x\right ) - \log \left (c^{2} x^{2} + 1\right )\right )} b d^{3}}{2 \, c} + \frac {1}{2} \, {\left (2 \, x^{3} \arctan \left (c x\right ) - c {\left (\frac {x^{2}}{c^{2}} - \frac {\log \left (c^{2} x^{2} + 1\right )}{c^{4}}\right )}\right )} b d e^{2} + \frac {1}{12} \, {\left (3 \, x^{4} \arctan \left (c x\right ) - c {\left (\frac {c^{2} x^{3} - 3 \, x}{c^{4}} + \frac {3 \, \arctan \left (c x\right )}{c^{5}}\right )}\right )} b e^{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(a+b*arctan(c*x)),x, algorithm="maxima")

[Out]

1/4*a*x^4*e^3 + a*d*x^3*e^2 + 3/2*a*d^2*x^2*e + a*d^3*x + 3/2*(x^2*arctan(c*x) - c*(x/c^2 - arctan(c*x)/c^3))*
b*d^2*e + 1/2*(2*c*x*arctan(c*x) - log(c^2*x^2 + 1))*b*d^3/c + 1/2*(2*x^3*arctan(c*x) - c*(x^2/c^2 - log(c^2*x
^2 + 1)/c^4))*b*d*e^2 + 1/12*(3*x^4*arctan(c*x) - c*((c^2*x^3 - 3*x)/c^4 + 3*arctan(c*x)/c^5))*b*e^3

________________________________________________________________________________________

Fricas [A]
time = 1.49, size = 190, normalized size = 1.32 \begin {gather*} \frac {12 \, a c^{4} d^{3} x + 3 \, {\left (4 \, b c^{4} d x^{3} e^{2} + 4 \, b c^{4} d^{3} x + {\left (b c^{4} x^{4} - b\right )} e^{3} + 6 \, {\left (b c^{4} d^{2} x^{2} + b c^{2} d^{2}\right )} e\right )} \arctan \left (c x\right ) + {\left (3 \, a c^{4} x^{4} - b c^{3} x^{3} + 3 \, b c x\right )} e^{3} + 6 \, {\left (2 \, a c^{4} d x^{3} - b c^{3} d x^{2}\right )} e^{2} + 18 \, {\left (a c^{4} d^{2} x^{2} - b c^{3} d^{2} x\right )} e - 6 \, {\left (b c^{3} d^{3} - b c d e^{2}\right )} \log \left (c^{2} x^{2} + 1\right )}{12 \, c^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(a+b*arctan(c*x)),x, algorithm="fricas")

[Out]

1/12*(12*a*c^4*d^3*x + 3*(4*b*c^4*d*x^3*e^2 + 4*b*c^4*d^3*x + (b*c^4*x^4 - b)*e^3 + 6*(b*c^4*d^2*x^2 + b*c^2*d
^2)*e)*arctan(c*x) + (3*a*c^4*x^4 - b*c^3*x^3 + 3*b*c*x)*e^3 + 6*(2*a*c^4*d*x^3 - b*c^3*d*x^2)*e^2 + 18*(a*c^4
*d^2*x^2 - b*c^3*d^2*x)*e - 6*(b*c^3*d^3 - b*c*d*e^2)*log(c^2*x^2 + 1))/c^4

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 262 vs. \(2 (129) = 258\).
time = 0.35, size = 262, normalized size = 1.82 \begin {gather*} \begin {cases} a d^{3} x + \frac {3 a d^{2} e x^{2}}{2} + a d e^{2} x^{3} + \frac {a e^{3} x^{4}}{4} + b d^{3} x \operatorname {atan}{\left (c x \right )} + \frac {3 b d^{2} e x^{2} \operatorname {atan}{\left (c x \right )}}{2} + b d e^{2} x^{3} \operatorname {atan}{\left (c x \right )} + \frac {b e^{3} x^{4} \operatorname {atan}{\left (c x \right )}}{4} - \frac {b d^{3} \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{2 c} - \frac {3 b d^{2} e x}{2 c} - \frac {b d e^{2} x^{2}}{2 c} - \frac {b e^{3} x^{3}}{12 c} + \frac {3 b d^{2} e \operatorname {atan}{\left (c x \right )}}{2 c^{2}} + \frac {b d e^{2} \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{2 c^{3}} + \frac {b e^{3} x}{4 c^{3}} - \frac {b e^{3} \operatorname {atan}{\left (c x \right )}}{4 c^{4}} & \text {for}\: c \neq 0 \\a \left (d^{3} x + \frac {3 d^{2} e x^{2}}{2} + d e^{2} x^{3} + \frac {e^{3} x^{4}}{4}\right ) & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)**3*(a+b*atan(c*x)),x)

[Out]

Piecewise((a*d**3*x + 3*a*d**2*e*x**2/2 + a*d*e**2*x**3 + a*e**3*x**4/4 + b*d**3*x*atan(c*x) + 3*b*d**2*e*x**2
*atan(c*x)/2 + b*d*e**2*x**3*atan(c*x) + b*e**3*x**4*atan(c*x)/4 - b*d**3*log(x**2 + c**(-2))/(2*c) - 3*b*d**2
*e*x/(2*c) - b*d*e**2*x**2/(2*c) - b*e**3*x**3/(12*c) + 3*b*d**2*e*atan(c*x)/(2*c**2) + b*d*e**2*log(x**2 + c*
*(-2))/(2*c**3) + b*e**3*x/(4*c**3) - b*e**3*atan(c*x)/(4*c**4), Ne(c, 0)), (a*(d**3*x + 3*d**2*e*x**2/2 + d*e
**2*x**3 + e**3*x**4/4), True))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x+d)^3*(a+b*arctan(c*x)),x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

Mupad [B]
time = 0.80, size = 197, normalized size = 1.37 \begin {gather*} \frac {a\,e^3\,x^4}{4}+a\,d^3\,x-\frac {b\,d^3\,\ln \left (c^2\,x^2+1\right )}{2\,c}-\frac {b\,e^3\,x^3}{12\,c}+b\,d^3\,x\,\mathrm {atan}\left (c\,x\right )+\frac {3\,a\,d^2\,e\,x^2}{2}+a\,d\,e^2\,x^3+\frac {b\,e^3\,x}{4\,c^3}-\frac {b\,e^3\,\mathrm {atan}\left (c\,x\right )}{4\,c^4}+\frac {b\,e^3\,x^4\,\mathrm {atan}\left (c\,x\right )}{4}-\frac {3\,b\,d^2\,e\,x}{2\,c}+\frac {3\,b\,d^2\,e\,\mathrm {atan}\left (c\,x\right )}{2\,c^2}+\frac {3\,b\,d^2\,e\,x^2\,\mathrm {atan}\left (c\,x\right )}{2}+b\,d\,e^2\,x^3\,\mathrm {atan}\left (c\,x\right )+\frac {b\,d\,e^2\,\ln \left (c^2\,x^2+1\right )}{2\,c^3}-\frac {b\,d\,e^2\,x^2}{2\,c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atan(c*x))*(d + e*x)^3,x)

[Out]

(a*e^3*x^4)/4 + a*d^3*x - (b*d^3*log(c^2*x^2 + 1))/(2*c) - (b*e^3*x^3)/(12*c) + b*d^3*x*atan(c*x) + (3*a*d^2*e
*x^2)/2 + a*d*e^2*x^3 + (b*e^3*x)/(4*c^3) - (b*e^3*atan(c*x))/(4*c^4) + (b*e^3*x^4*atan(c*x))/4 - (3*b*d^2*e*x
)/(2*c) + (3*b*d^2*e*atan(c*x))/(2*c^2) + (3*b*d^2*e*x^2*atan(c*x))/2 + b*d*e^2*x^3*atan(c*x) + (b*d*e^2*log(c
^2*x^2 + 1))/(2*c^3) - (b*d*e^2*x^2)/(2*c)

________________________________________________________________________________________